import 'package:color_dart/RgbaColor.dart';
import 'package:flutter/material.dart';
import 'package:im_flutter_sdk_example/components/a_button/index.dart';
import 'package:im_flutter_sdk_example/components/labels/index.dart';
import 'package:im_flutter_sdk_example/utils/constants.dart';

class Achievement extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      color: Colors.white,
      height: 204,
      margin: EdgeInsets.only(bottom: 10),
      child: Column(children: [
        Container(
          height: 77,
          child: Row(
            children: [
              SizedBox(
                width: 107,
                height: 77,
                child: Image.asset(
                  'lib/assets/images/order/order1.png',
                  fit: BoxFit.cover,
                ),
              ),
              Padding(
                padding: const EdgeInsets.only(left: 10),
                child: Column(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    Text('精密视觉检测项目（中科慧远）', style: mainTitleStyle),
                    Row(
                      children: [
                        LabelTuijian(),
                        spaceL(
                          AButton.normal(
                              width: 44,
                              height: 17,
                              bgColor: rgba(232, 243, 255, 1),
                              type: 'primary',
                              onPressed: () {},
                              child: Text('医疗',
                                  style: TextStyle(
                                      fontSize: 12,
                                      color: rgba(97, 142, 210, 1)))),
                        ),
                        spaceL(
                          AButton.normal(
                              width: 44,
                              height: 17,
                              bgColor: rgba(232, 243, 255, 1),
                              type: 'primary',
                              onPressed: () {},
                              child: Text('云计算',
                                  style: TextStyle(
                                      fontSize: 12,
                                      color: rgba(97, 142, 210, 1)))),
                        )
                      ],
                    ),
                    Row(children: [
                      SizedBox(
                        width: 12,
                        height: 12,
                        child: Image.asset(
                          'lib/assets/images/label/label.png',
                          fit: BoxFit.cover,
                        ),
                      ),
                      Text(
                        ' 项目融资、落地',
                        style: TextStyle(color: rgba(235, 101, 13, 1)),
                      )
                    ])
                  ],
                ),
              )
            ],
          ),
        ),
        Container(
          color: rgba(250, 250, 250, 1),
          margin: EdgeInsets.only(top: 10, bottom: 10),
          padding: EdgeInsets.all(6),
          child: Column(
            children: [
              Text('2018年8月14日完成天使轮融资融资方为赛富投资基金 2019年4月15日完成A轮融资投资方有纳远明志…',
                  style:
                      TextStyle(color: rgba(107, 107, 107, 1), fontSize: 14)),
            ],
          ),
        ),
        Container(
          height: 50,
          decoration: BoxDecoration(
              border: Border(
                  bottom: BorderSide(
                      width: 1, color: Color.fromRGBO(242, 242, 242, 1)))),
          child:
              Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
            Row(
              children: [
                SizedBox(
                  width: 24,
                  height: 24,
                  child: Image.asset(
                    'lib/assets/images/default_avatar.png',
                    fit: BoxFit.cover,
                  ),
                ),
                Container(
                    child: Text('云南国科智融科技发展有限公司',
                        style: TextStyle(
                            color: rgba(163, 163, 163, 1), fontSize: 12)),
                    margin: EdgeInsets.only(left: 10)),
              ],
            ),
            Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              children: [
                SizedBox(
                  width: 9,
                  height: 11,
                  child: Image.asset(
                    'lib/assets/images/label/label_position.png',
                    fit: BoxFit.contain,
                  ),
                ),
                Container(
                    child: Text('北京',
                        style: TextStyle(
                            color: rgba(163, 163, 163, 1), fontSize: 12)),
                    margin: EdgeInsets.only(left: 3)),
              ],
            ),
          ]),
        )
      ]),
    );
  }

  Widget spaceL(Widget child) {
    return Container(
      margin: EdgeInsets.only(left: 10),
      child: child,
    );
  }
}
